﻿using System.Collections.Generic;
using System.Net;
using System.Text;
using NUnit.Framework;
using Smartkernel.Net.HtmlParser;

namespace Smartkernel.NUnitTest.Net.HtmlParser
{
    [Category("Net.HtmlParser")]
    [TestFixture]
    public class SmartHtmlParserTest
    {
        [Test]
        public void Test()
        {
            //【01】获得html文件的Url列表（涉及方法：GetUrlList）
            string url = "http://www.cnblogs.com/smartkernel";
            WebClient webClient = new WebClient();
            webClient.Encoding = Encoding.UTF8;
            string html = webClient.DownloadString(url);
            List<string> list = SmartHtmlParser.GetUrlList(html);
            Assert.AreEqual(list.Count > 0, true);
        }
    }
}
